<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>

    <!--  Зависимости Bootstrap-->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"
            integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
            integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
            crossorigin="anonymous"></script>

    <title>Список кандидатов</title>
</head>
<body>
<div class="container-fluid p-0">
    <header th:insert="blocks/header :: header"></header>
    <div class="container">
        <div class="row">
            <table class="table">
                <thead>
                <tr>
                    <th scope="col">#</th>
                    <th scope="col">Имя кандидата</th>
                    <th scope="col">Описание</th>
                    <th scope="col">Дата создания</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="candidate: ${candidates}">
                    <td th:text="${candidate.id}"/>
                    <td><a th:text="${candidate.name}"
                           th:href="@{/candidates/{candidateId}(candidateId=${candidate.id})}"></a></td>
                    <td th:text="${candidate.description}"/>
                    <td th:text="${candidate.creationDate}"/>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <footer th:insert="blocks/footer :: footer"></footer>
</div>
</body>
</html>